<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script>
    function check()
    {
        var name = document.getElementById("name");
        var pass = document.getElementById("pass");
        var errStr = "";
        if("" == name.valueOf() || null == name.valueOf())
            {
                errStr += "this is blank";
            }
        if("" == errStr || null == errStr)
            {
                 return true;
            }
        alert(errStr);
        return false;
        document.getElementById("loginForm").onsubmit = check;      
</script>
<body>
	<form action=RegServlet>
	usernaem:</br>
		<input id="name"></br>
	password:</br>
	    <input id="pass"></br>
	<input type="submit"/>
	<input type="button"/>
	</form>

</body>
</html>